package org.casscommunity.sights.shared.validation;

import java.io.Serializable;

import com.google.gwt.editor.client.EditorError;

public class ConstraintViolationDto implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private String path;
	private String message;
	
	public ConstraintViolationDto() { }
	
	public ConstraintViolationDto(String path, String message, Object invalidValue) {
		this.path = path;
		this.message = message;
	}
	
	public ConstraintViolationDto(EditorError error) {
		this.path = error.getPath();
		this.message = error.getMessage();
	}
	
	public String getPath() {
		return path;
	}
	
	public void setPath(String path) {
		this.path = path;
	}
	
	public String getMessage() {
		return message;
	}
	
	public void setMessage(String message) {
		this.message = message;
	}
	
}
